package jvm;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by duan lian on 2017-08-03.
 */
public class RuntimeConstantPoolOOM {

	// JDK 1.6 or less; VM args: -XX:PermSize=10M -XX:MaxPermSize=10M
	public static void main(String[] args) {
		int i=0;
		List<String> list=new ArrayList<>();
		while(true) {
			list.add(String.valueOf(i++).intern());
		}
	}
}
